$OpenBSD: patch-installer_dcheck_py,v 1.9 2016/05/05 08:25:31 ajacoutot Exp $
--- installer/dcheck.py.orig	Wed May  4 07:23:15 2016
+++ installer/dcheck.py	Thu May  5 10:02:31 2016
@@ -48,7 +48,7 @@ mod_output = ''
 def update_ld_output():
     # For library checks
     global ld_output
-    status, ld_output = utils.run('%s -p' % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
+    status, ld_output = utils.run('%s -r' % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
 
     if status != 0:
         log.debug("ldconfig failed.")
@@ -103,7 +103,7 @@ def check_lib(lib, min_ver=0):
         log.debug("Not found.")
         return False
 
-def check_file(f, dir="/usr/include"):
+def check_file(f, dir="${LOCALBASE}/include"):
     log.debug("Searching for file '%s' in '%s'..." % (f, dir))
     for w in utils.walkFiles(dir, recurse=True, abs_paths=True, return_folders=False, pattern=f):
         log.debug("File found at '%s'" % w)
@@ -378,10 +378,13 @@ def get_libpthread_version():
     except ImportError:
         return '-'
     else:
+        if sys.platform.startswith('linux'):
 #        LIBC = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
-        LIBC = ctypes.CDLL(ctypes.util.find_library('c'),ctypes.DEFAULT_MODE,None, True)
-        LIBC.gnu_get_libc_version.restype = ctypes.c_char_p
-        return LIBC.gnu_get_libc_version()
+            LIBC = ctypes.CDLL(ctypes.util.find_library('c'),ctypes.DEFAULT_MODE,None, True)
+            LIBC.gnu_get_libc_version.restype = ctypes.c_char_p
+            return LIBC.gnu_get_libc_version()
+        else:
+            return '-'
 
 def get_python_xml_version():
     try:
